﻿//========================================================================//
//      Copyright 2012, Smilodon Studio Inc.
//      All rights reserved.
//========================================================================//

/**
 *	pages
 *      @author: CYS
 */




var pages = function(w, h, canvas)
{
	this.w = w || 1;
	this.h = h || 1;
	this.canvas = canvas || document.createElement("canvas");
	this.canvas.width = this.w;
	this.canvas.height = this.h;
	this.p2D = this.canvas.getContext("2d");
	this.callback;
	this.id;
}


pages.prototype.resize = function(w, h) 
{
	this.w = w || 1;
	this.h = h || 1;
	this.canvas.width = this.w;
	this.canvas.height = this.h;
}

pages.prototype.setDraw = function( callback )
{
	this.callback = callback;
}


pages.prototype.draw = function()
{
	this.callback();
}